<template>
  <view class="wrap">
    <web-view src="https://www.jin10.com/example/jin10.com.html "></web-view>
    <view class="uni-p-b-98"></view>
    <pageFooter
      :shareData="shareData"
      :isShowAllMenu="isShowAllMenu"
      :selected="2"
    ></pageFooter>
  </view>
</template>

<script setup lang="ts">
import pageFooter from "@/components/pageFooter/index.vue";
import { onLoad, onShow } from "@dcloudio/uni-app";
import Cache from "@/utils/cache";
import wx from "weixin-js-sdk";
let isShowAllMenu = ref(false);
let shareData = ref({
  business_id: "",
  urltype: "",
});
onLoad((option) => {
  if (option.business_id) {
    shareData.value.business_id = option.business_id;
    shareData.value.urltype = option.urltype;
    Cache.set("urltype", option.urltype);
    Cache.set("business_id", option.business_id);
    isShowAllMenu.value = false;
  }
});
onShow(() => {
  setShareHandler();
  if (Cache.get("business_id")) {
    isShowAllMenu.value = false;
  } else {
    isShowAllMenu.value = true;
  }
});
function setShareHandler() {
  wx.ready(() => {
    wx.showAllNonBaseMenuItem();
    wx.hideMenuItems({
      menuList: ["menuItem:copyUrl"], // 屏蔽复制链接
    });
  });
}
</script>

<style scoped lang="scss">
.wrap {
  width: 100vw;
  overflow: hidden;
  // max-width: 750rpx;
  margin: 0 auto;
  min-height: 100vh;
  .list_box {
    padding: 0 20rpx;
    .list_item {
      $imgH: 150rpx;
      padding: 20rpx 0;
      border-bottom: 2rpx solid rgba(243, 245, 245, 1);
      .info_box {
        height: $imgH;
        .title {
          font-size: 30rpx;
          color: rgba(46, 46, 46, 1);
        }
        .time {
          color: rgba(150, 153, 157, 1);
          font-size: 24rpx;
        }
      }
      .image_box {
        border-radius: 16rpx;
        margin-right: 15rpx;
        overflow: hidden;
        width: 230rpx;
        height: $imgH;
        background: #f5f5f5;
        flex-shrink: 0;
        image {
          width: 100%;
          height: 100%;
        }
      }
    }
  }
}
</style>
